Package com.rnett.action

Path, OS, and utilities.

Types

OperatingSystem
Link copied to clipboard
enum OperatingSystem : Enum<OperatingSystem>
Operating system Enum.
Path
Link copied to clipboard
class Path(rawPath: String, resolve: Boolean)
Path handling utilities modeled after JVM's Path and Python's pathlib.

Functions

asBuffer
Link copied to clipboard
fun ByteArray.asBuffer(): <ERROR CLASS>
Non-copying conversion to a Buffer.
asByteArray
Link copied to clipboard
fun Int8Array.asByteArray(): ByteArray
Non-copying conversion to a Kotlin ByteArray.
fun Uint8Array.asByteArray(): ByteArray
Non-copying conversion to a Kotlin ByteArray.
fun ArrayBuffer.asByteArray(byteOffset: Int = 0, length: Int = this.byteLength): ByteArray
Non-copying conversion to a Kotlin ByteArray.
asInt8Array
Link copied to clipboard
fun ByteArray.asInt8Array(): Int8Array
Non-copying conversion to a Int8Array.
camelToSnakeCase
Link copied to clipboard
fun String.camelToSnakeCase(): String
Convert a camelCase string to snake-case.
jsEntries
Link copied to clipboard
inline fun jsEntries(jsObject: dynamic): Map<String, dynamic>
Get the entries of a JS object, using Object.entries.
JsObject
Link copied to clipboard
inline fun <T : Any> JsObject(block: T.() -> Unit = {}): T
Create a JavaScript object for the given interface.
snakeToCamelCase
Link copied to clipboard
fun String.snakeToCamelCase(): String
Convert a snake-case string to camelCase.
toFlow
Link copied to clipboard
inline fun <T : Any> <ERROR CLASS>.toFlow(): <ERROR CLASS><T>
Convert a NodeJS stream to a flow.
inline fun <T : Any> () -> <ERROR CLASS>.toFlow(): <ERROR CLASS><T>
Convert a NodeJS stream to a flow.
toObjectStream
Link copied to clipboard
suspend fun <ERROR CLASS><Any>.toObjectStream(scope: <ERROR CLASS> = GlobalScope): <ERROR CLASS>
Convert a flow to an object mode stream by writing the flow's elements to an internal.
toStream
Link copied to clipboard
suspend fun <ERROR CLASS><<ERROR CLASS>>.toStream(scope: <ERROR CLASS> = GlobalScope): <ERROR CLASS>
Convert a flow to a stream by writing the flow's elements to an internal.
suspend fun <ERROR CLASS><ByteArray>.toStream(scope: <ERROR CLASS> = GlobalScope): <ERROR CLASS>
Convert a flow to a stream by writing the flow's elements to an internal.
suspend fun <ERROR CLASS><String>.toStream(scope: <ERROR CLASS> = GlobalScope): <ERROR CLASS>
Convert a flow to a stream by writing the flow's elements to an internal.
writeLine
Link copied to clipboard
fun <ERROR CLASS>.writeLine(buffer: String): Boolean
Write a line to this, using the OS's line seperator.
fun <ERROR CLASS>.writeLine(buffer: String): Boolean
Write a line to this, using the OS's line seperator.
writeSuspending
Link copied to clipboard
suspend fun <ERROR CLASS>.writeSuspending(buffer: <ERROR CLASS>)
Write to a stream, suspending until the write completes.
suspend fun <ERROR CLASS>.writeSuspending(buffer: String)
Write to a stream, suspending until the write completes.
suspend fun <ERROR CLASS>.writeSuspending(buffer: Any)
Write to a stream, suspending until the write completes.
suspend fun <ERROR CLASS>.writeSuspending(buffer: String, encoding: String)
Write to a stream, suspending until the write completes.
suspend fun <ERROR CLASS>.writeSuspending(buffer: Any, encoding: String)
Write to a stream, suspending until the write completes.

Properties

currentProcess
Link copied to clipboard
val currentProcess: <ERROR CLASS>
Get the current process.